/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.transportsis.services;

import context.arch.comm.DataObject;
import context.arch.service.Service;
import context.arch.service.helper.FunctionDescription;
import context.arch.service.helper.FunctionDescriptions;
import context.arch.service.helper.ServiceInput;
import context.arch.widget.Widget;


/**
 *
 * @author hgb
 */
public class TransitoService extends Service{
    
    private String aviso;
    
   @SuppressWarnings("serial")
   public TransitoService(final Widget widget) {       
       super(widget, "TransitoService",
            new FunctionDescriptions() {{
               // define function for the service
               add(new FunctionDescription(
                     "TransitoControl",
                     "Envia avisos para os carros",
                     widget.getNonConstantAttributes()));
            }});
       aviso = new String();
   }

    @Override
    public DataObject execute(ServiceInput si) {
        this.aviso = si.getInput().getAttributeValue("aviso");
        
        return new DataObject();
    }

    /**
     * @return the aviso
     */
    public String getAviso() {
        return aviso;
    }

    /**
     * @param aviso the aviso to set
     */
    public void setAviso(String aviso) {
        this.aviso = aviso;
    }

    
}
